package com.xu.cloud.common.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.io.Serializable;

/**
 * 排序字段 dto
 *
 * @author xuguan
 * @since 2025/4/7
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class OrderColumnDTO implements Serializable {
    private static final long serialVersionUID = 8296895995282491550L;
    /**
     * 排序字段名称
     */
    private String column;
    /**
     * 排序方式, ASC正序, DESC倒序
     */
    private String orderType = "ASC";

    public boolean isAsc() {
        return "ASC".equalsIgnoreCase(orderType);
    }
}
